package com.jt.demo22.aop;

import com.jt.demo22.Spring.Spring22;
import com.jt.demo22.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {
    public static void main(String[] args) {
        ApplicationContext a = new AnnotationConfigApplicationContext(Spring22.class);
        UserService bean = a.getBean(UserService.class);
        System.out.println(bean.getClass());
        bean.hello();
        bean.findName();
    }
}
